package org.pybaldaj.gui;

import java.awt.*;

import javax.swing.*;
/**
 * @author g3n1uss
 * Main window of application. Here is game field and statistical info.
 */
@SuppressWarnings("serial")
public class AppFrame extends JFrame{

	public AppFrame(){
		this.buildFrame();
	}
	public void buildFrame(){
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		setTitle("pybaldaj");
		//width and height are gotten from preferences loaded by AppPreferences
		//current definition s temporary
		int width=400;
		int height=400;
		//place main window at right upper corner
		setBounds(screenSize.width-width,0,width,height);
		setLayout(new BorderLayout());
		//panel with tabs, every tab corresponds one game
		AppTabbedPanel tabspanel=new AppTabbedPanel();
		//panel with games, player, users
		AppListGamesUsersPanel listpanel=new AppListGamesUsersPanel();
		//add panels to main frame
		add(tabspanel,BorderLayout.WEST);
		add(listpanel,BorderLayout.EAST);

	}

}
